<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>个人主页</title>
    <link rel="stylesheet" href="../assets/css/common.css"/>
    <link rel="stylesheet" href="../assets/plugin/layer/skin/layer.css"/>
    <style type="text/css">
        body, html {
            margin: 0;
            padding: 0;
            font-family: Arial, 'Microsoft YaHei';
            background-color: #e7eaf3;
        }

        .top-section {
            color: #fff;
            height: 10rem;
            text-align: center;
            font-size: 0.9rem;
            letter-spacing: 1px;
            background: linear-gradient(-139deg, rgb(4, 190, 254) 0%, rgb(68, 129, 235) 100%);
            background: -webkit-linear-gradient(-139deg, rgb(4, 190, 254) 0%, rgb(68, 129, 235) 100%);
            background: -ms-linear-gradient(-139deg, rgb(4, 190, 254) 0%, rgb(68, 129, 235) 100%)
        }

        .top-section img {
            width: 3.3rem;
            height: 3.3rem;
            margin-top: 2rem;
        }

        .account-section {
            display: flex;
            justify-content: center;
            font-size: 0.7rem;
            padding-top: 1rem;
            padding-bottom: 1rem;
            letter-spacing: 1px;
            background-color: #fff;
        }

        .account-section td {
            padding-bottom: 0.6rem;
        }

        .account-section img {
            margin-right: 0.2rem;
        }

        .account-money {
            color: #01e4ff;
        }

        .btn-section {
            padding-left: 0.9rem;
            padding-right: 0.9rem;
            margin-top: 1rem;
        }

        .account-section-template {
            display: none;
        }
    </style>
</head>
<body>
<div class="top-section">
    <img src="../assets/img/user_76px.png" alt=""/>

    <p>一线通账号：<span>XXXX</span></p>
</div>
<div class="main-section">
    <div class="account-section account-section-template">
        <table>
            <tbody>
            <tr>
                <td>
                    <img src="../assets/img/update_16px.png" alt=""/>更新时间：
                </td>
                <td>
                    <span class="update-time">2017-06-29 10:58</span>
                </td>
            </tr>
            <tr>
                <td>
                    <img src="../assets/img/company_16px.png" alt=""/>所属公司：
                </td>
                <td>
                    <span class="account-company">佛山明睿达科技有限公司</span>
                </td>
            </tr>
            <tr>
                <td>
                    <img src="../assets/img/money_16px.png" alt=""/>公司余额：
                </td>
                <td>
                    <span class="account-money">￥5000.00</span>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<div class="btn-section">
    <button type="button" class="common-btn">业务查询</button>
</div>
<script type="text/javascript" src="../assets/js/jquery.js"></script>
<script type="text/javascript" src="../assets/js/config.js"></script>
<script type="text/javascript" src="../assets/js/common.js"></script>
<script type="text/javascript" src="../assets/plugin/layer/layer.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $.ajax({
                   /*url:'../assets/js/testData/personal.js',*/
                   url: addressUrl + "userInfo",
                   /*data:getParams(),*/
                   type: 'get',
                   dataType: 'json',
                   cache: false,
                   success: function (data) {
                       var result = data;
                       $clone =
                           $(".account-section-template").clone()
                               .removeClass("account-section-template");
                       if (result.error_code == 0) {
                           $(".top-section span").text(result.account);
                           $clone.find(".update-time").text(result.date).end()
                               .find(".account-company").text(result.refComName).end()
                               .find(".account-money").text(result.comBalance);
                           $(".main-section").append($clone);
                       } else {
                           layer.alert("暂时无法查询个人资料", {
                               closeBtn: 0
                           }, function () {
                               WeixinJSBridge.call("closeWindow");
                           });
                       }

                   }
               })
        $(".common-btn").on("click", function () {
            window.location.href = "search.html";
        })
    });
</script>
</body>
</html>